package com.muyu.system.domain.model;

import com.muyu.common.core.web.domain.BaseEntity;
import com.muyu.system.domain.req.SysDictTypeUpdReq;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 *
 * 数据字典类型修改模型
 * @author
 * @version 1.0
 * @date 2025/2/24 1:35
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class SysDictTypeUpdModel extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 字典主键
     */
    private Long dictId;

    /**
     * 字典名称
     */
    private String dictName;

    /**
     * 字典类型
     */
    private String dictType;

    /**
     * 状态（0正常 1停用）
     */

    private String status;

   public static SysDictTypeUpdModel buildUpdModel(SysDictTypeUpdReq sysDictTypeUpdReq) {
       return SysDictTypeUpdModel.builder()
               .dictId(sysDictTypeUpdReq.getDictId())
               .dictName(sysDictTypeUpdReq.getDictName())
               .dictType(sysDictTypeUpdReq.getDictType())
               .status(sysDictTypeUpdReq.getStatus())
               .build();
   }
}
